package com.example.royalchef.bean;

import android.content.Context;

/**
 * Created by Maochuan on 2016/12/21.
 */

public class JavascriptInterface {

    private Context context;

    public JavascriptInterface(Context context) {
        this.context = context;
    }

    @android.webkit.JavascriptInterface
    public void openImage(String img) {

        // ImagePreviewActivity.launch(context, img);
    }

    @android.webkit.JavascriptInterface
    public void openHref(String href) {
//        // 使用浏览器打开链接
//        Intent intent = new Intent(Intent.ACTION_VIEW);
//        intent.setData(Uri.parse(href));
//        context.startActivity(intent);
    }

    @android.webkit.JavascriptInterface
    public void log(String message) {

        // LogUtil.i(context, message);
    }
}
